errstar = importdata('errstar.out');
global tmax ge AllmassNUM M1MAX M1MIN SFR qNUM aNUM minLx maxLx alpha
alpha=2.7;
tmax=1d4*1d6; % in units of year
AllmassNUM=1d3;
M1MAX=150;
M1MIN=2;
SFR=1;
qNUM=10;
aNUM=100;
mass=exp(linspace(log(M1MIN),log(M1MAX),AllmassNUM));
sum(massFunction(mass))/1d6
sum(massFunction(errstar(:,1)))/1d6
subplot 311
 hist(errstar(:,1))
 title('mass')
 subplot 312
 hist(errstar(:,2))
 title('mass ratio')
 subplot 313
 hist(errstar(:,3))
 title('seperation')